from django.urls import re_path
from .views import channels,createarticle,contentarticle
from . import viewsss

urlpatterns = [
    # 短信验证码
    re_path(r'^sms_codes/(?P<mobile>1[3-9]\d{9})/$', viewsss.SMSCodeView.as_view()),
    # 频道列表
    re_path(r'^channels/$', channels.ArticleChannel.as_view()),
    # 文章列表
    re_path(r'^article/(?P<id>-?\d+)/channel/$', viewsss.ArticleList.as_view()),
    # 收藏 取消收藏 文章
    re_path(r'^article/(?P<id>\d+)/collect/$', viewsss.ArticleCollectView.as_view()),
    # # 文章详情
    re_path(r'^article/(?P<id>\d+)/$',contentarticle.ArticleContentAPIView.as_view()),
    # 发布文章
    re_path(r'^article/$',createarticle.CreateArticleAPIView.as_view()),
]